<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>
    <div class="header-input">
      <i class="iconfont">&#xe632;</i>
      输入城市/景点/游玩主题
    </div>
    <router-link to="/city" tag="b">
      <div class="header-right">
        {{this.city}}
        <i class="iconfont arrow-icon">&#xe6aa;</i>
      </div>
    </router-link>
  </div>
</template>

<script>
  import {mapState, mapGetters} from 'vuex'

  export default {
    name: 'Header',
   /* props:{
      city: String
    }*/
   computed: {
     ...mapState(['city']),
     ...mapGetters(['doubleCity'])
   }
  }
</script>

<style scoped lang="stylus">
  @import "~style/varibles.styl"
  .header{
    display: flex;

    height : $headerHeight;
    background: $bgColor;
    color: #fff;
    line-height: .86rem;
  }
  .header-left {
    float: left;

    width: .64rem;
  }
  .header-right {
    float: right;

    min-width: 1.04rem;
    padding 0 .1rem
    text-align: center;
  }
  .back-icon{
    text-align: center;
    font-size: .4rem;
  }
  .header-input {
    flex: 1;
    height: .64rem;
    line-height: .64rem;

    background: #fff;
    border-radius: .1rem;
    margin-top: .12rem;
    margin-left: .2rem;
    padding-left: .2rem;
    color: #ccc;
  }
  .arrow-icon{
    font-size: .28rem;
    /*margin-left: -.04rem;*/
  }

</style>
